<?php

namespace app\models;

use Yii;
use yii\base\Model;

class Vip
{
    /**
     * @param $formData
     * @return int
     * @throws \yii\db\Exception
     * 1成功0失败
     * vip添加
     */
	public static function vipadd($formData){
        $time = date('Y-m-d H:i:s', time());
        $result = Yii::$app->db->createCommand()->insert('vip', [
            'vip_name' => $formData['vip_name'],
            'vip_sex' => $formData['vip_sex'],
            'vip_tel' => $formData['vip_tel'],
            'vip_email' => $formData['vip_email'],
            'vip_city' => $formData['vip_city'],
            'vip_area' => $formData['vip_area'],
            'vip_time' => $time
        ])->execute();
        return $result?1:0;
    }
}